
import { Routes, Route } from 'react-router-dom';
import LayoutPage from './page/layout';
import LoginPage from './yang/LoginPage';
// 以下为解决合并冲突后的代码，采用新版本内容
import Home3 from './zhang/home3'
import Add1 from './zhang/add'
import Home2 from './wang/home2';
import About from './wang/about';
import RegisterPage from './yang/RegisterPage'; // 新增导入
import Appear from './wang/appear';
import Home1 from './yang/home1';
import ProfileSettingPage from './yang/ProfileSettingPage';
import { Navigate } from 'react-router-dom';
import VideoFeed from './liu/VideoFeed';


function App() {
  return (
    
    <Routes>
      {/* 登录页保持独立 */}
      <Route path="/login" element={<LoginPage />} />
      <Route path="/register" element={<RegisterPage />} /> {/* 新增注册路由 */}
      <Route
        path="/"
        element={
         <Navigate to="/login" />
        }
      />
      <Route path="/register" element={<RegisterPage />} />

      {/* 其他页面作为Layout的子路由 */}
      <Route path="/" element={<LayoutPage />}>
        <Route path="/home3" element={<Home3 />} />
        <Route path="/add" element={<Add1 />} />
        <Route path="about" element={<About />} />
        <Route path="home2" element={<Home2 />} />
        <Route path="appear" element={<Appear />} />
        <Route path="/home1" element={<Home1 />} />
        <Route path="/profile" element={<ProfileSettingPage />} />
        <Route path="/video-feed" element={<VideoFeed />} />
      </Route>
    </Routes>
  );
}

export default App;